package demo5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 何华树
 * Date: 2024-08-31
 * Time: 16:38
 */

class D {
    public D() {
        func();
    }
    public void func() {
        System.out.println("D()..");
    }
}
class B extends D{
    public int num = 1;
    public B() {
        super();
    }
    public void func() {
        System.out.println("B()...."+num);
    }
}
public class Test1 {
    public static void main(String[] args) {
        B b = new B();
    }
}
